import { axios } from '@/utils/request'

export function shopInstockList(query) {  //门店入库列表
    return axios({
        url: '/yjsh/instock/shopInstockList',
        method: 'get',
        params: query
    })
}


export function shopInstockDetail(inStockId) {  //入库单详情
    return axios({
        url: '/yjsh/instock/shopInstockDetail/' + inStockId,
        method: 'get'
    })
}

export function detailsInquiry(inStockId) {  //入库单详情查询商品
    return axios({
        url: '/yjsh/instock/shopInstockDetail/' + inStockId,
        method: 'get'
    })
}

export function shopInstockGoodsConfirm(obj) {  //门店入库完成操作
    return axios({
      url: '/yjsh/instock/shopInstockGoodsConfirm',
      method: 'post',
      data: obj
    })
  }



export function shopInstockGoodsNewAdd(obj) {   //门店添加自建商品入库单
    return axios({
        url: '/yjsh/instock/shopInstockGoodsNewAdd',
        method: 'put',
        data: obj
    })
}
export function shopInstockGoodsOperate(obj) {   //门店入库操作
    return axios({
        url: '/yjsh/instock/shopInstockGoodsOperate',
        method: 'put',
        data: obj
    })
}

export function shopgoodscategory(obj) {  //商品类目
    return axios({
        url: '/yjsh/shopgoodscategory/tree',
        method: 'post',
        data: obj
    })
}

export function platformgoodsinfo(query) {  //平台商品
    return axios({
        url: '/yjsh/platformgoodsinfo/page',
        method: 'get',
        params: query
    })
}


export function shopGoodsInfoList(query) {  //根据门店商品类目获取平台商品
    return axios({
        url: '/yjsh/purchaseinfo/shopGoodsInfoList',
        method: 'get',
        params: query
    })
}
export function shopGoodsInfoPage(query) {  //根据门店商品类目获取平台商品
    return axios({
        url: '/yjsh/purchaseinfo/shopGoodsInfoPage',
        method: 'get',
        params: query
    })
}
export function rejectedreason(inOutType) {  //通过inOutType查询 00表示出库01表示入库
    return axios({
        url: '/yjsh/rejectedreason/' + inOutType,
        method: 'get',
    })
}